package com.yupi.yuojbackendserviceclient.service;


import com.yupi.yuojbackendmodel.model.entity.Question;
import com.yupi.yuojbackendmodel.model.entity.QuestionSubmit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


@FeignClient(name = "yuoj-backend-question-service",path = "/api/question/inner")
public interface QuestionFeignClient {

    //questionService.getById(questionId)
    //questionSubmitService.getById(questionSubmitId)
    //questionSubmitService.updateById(questionSubmitUpdate)
    @GetMapping("/get/id")
    Question getQuestionByid(@RequestParam("questionId") long questionId);

    @GetMapping("/question_submit/get/id")
    QuestionSubmit getQuestionSubmitByid(@RequestParam("questionSubmitId") long questionSubmitId);

    @PostMapping("/question_submit/update")
    Boolean updateQuestionSubmitByid(@RequestBody QuestionSubmit questionSubmit);
    @PostMapping("/question/update")
    Boolean updaById(@RequestBody Question question);
}
